#ifndef _CONSOLE_H_
#define _CONSOLE_H_

#ifdef EXPORT_API
#define EXPORT_LIB __declspec(dllexport)
#else
#define EXPORT_LIB __declspec(dllimport)
#endif

typedef xgc_uint8	window_t;
typedef xgc_uint8	text_t;

#define INVALID_WINDOW_INDEX xgc_uint8(255)
#define INVALID_BUFFER_INDEX xgc_uint8(255)

enum text_border
{
	text_top,
	text_left,
	text_right,
	text_bottom,

	text_topleft,
	text_bottomleft,
	text_topright,
	text_bottomright,

	text_count,
};

EXPORT_LIB xgc_bool	initialize_console_library();
EXPORT_LIB xgc_void	finialize_console_library();
EXPORT_LIB xgc_void	gotoxy( xgc_int16 x, xgc_int16 y );
EXPORT_LIB text_t	text( xgc_uint16 w, xgc_uint16 h );
EXPORT_LIB window_t window( xgc_int16 x, xgc_int16 y, xgc_int16 cols, xgc_int16 rows, text_t text  );
EXPORT_LIB xgc_void draw_window( window_t window );
EXPORT_LIB xgc_void draw_text( window_t window );
EXPORT_LIB xgc_void free( window_t );
EXPORT_LIB xgc_int32 wprintf_ascii( xgc_byte window, xgc_lpcstr fmt, ... );

#endif //_CONSOLE_H_